<?php
/**
 * Created by PhpStorm.
 * User: asus
 * Date: 2018/9/24
 * Time: 23:35
 */

class Book extends Commodity
{
    private $name;
    private $price;
    private $author;
    private $made;

    function show()
    {
        echo "作者是".$this->author."的书，书名为".$this->name."，价格为".$this->price."，由".$this->made."出版的"."<br>";
    }

    function __set($name, $value)
    {
        $this->$name=$value;
    }
}